================================================================================
REPLICATION MATERIALS README
================================================================================

Title: Partners in Government: Politicians' Gender Preferences in Coalition Formation
Author: Alba Huidobro
Date: November 2025

================================================================================
OVERVIEW
================================================================================

This replication package contains all data and code necessary to reproduce 
the figures and tables in the main text and appendix of the manuscript.


================================================================================
SOFTWARE REQUIREMENTS
================================================================================

Software:
   - Stata 18 (original analysis)
   - Stata 14 or higher should work for replication
   
Required Stata packages:
   - coefplot (for coefficient plots)
   - esttab (for regression tables)
   - plotplain scheme (graph scheme, set automatically in code)

To install required packages, run in Stata:
   ssc install gr0070
   ssc install coefplot
   ssc install estout

================================================================================
DATA FILES
================================================================================

The replication package includes the following datasets:

1. main_database.dta
   - Main analysis dataset for conjoint experiment
   - Used for: Figures 2, 3, 4 and related appendix materials
   
2. data_councillors_aggregated.dta
   - Aggregated data on councillors by position and year
   - Used for: Figure 1
   
3. women_mps_world.dta
   - Data on women members of parliament internationally
   - Used for: Appendix Figure A1
   
4. women_local_leaders.dta
   - Data on women in local leadership positions
   - Used for: Appendix Figure A2

================================================================================
CODE FILES
================================================================================

main_analysis.do
   - Master do-file that generates all figures and tables
   - Produces both main text and appendix results
   

================================================================================
INSTRUCTIONS FOR REPLICATION
================================================================================

IMPORTANT: All data files must be in the same folder as the do-file.

1. Download all files (main_analysis.do and all .dta files) to a single 
   directory on your computer

2. Open Stata and set your working directory to the folder containing all files:
   
   In Stata, use the menu: File > Change Working Directory
   
   Or type in Stata:
   cd "C:/Users/YourName/Replication"
   
   (Replace with your actual folder path)

3. Open main_analysis.do in Stata's do-file editor

4. The do-file is now configured to use the current working directory 
   automatically (see updated line 7 in the do-file)

5. Run the entire do-file by clicking "Execute (do)" or by typing:
   do main_analysis.do

6. The log file "replication_log.txt" will be created automatically in your 
   working directory and will contain all output


================================================================================
NOTES
================================================================================

Note: Table 2 and Table A1 use individual-level data on mayors (gender, age, education, 
party, population, etc.) that cannot be shared due to data protection 
regulations. The combination of variables would make mayors identifiable.

================================================================================
CONTACT
================================================================================

For questions or issues with replication, please contact:
alba.huidobro@upf.edu

